/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Employee_List.java
 *
 * Created on 13 ม.ค. 2553, 10:46:11
 */

package warehouse;

/**
 *
 * @author Administrator
 */
public class PnlListEmployee extends javax.swing.JPanel {

    /** Creates new form Employee_List */
    public PnlListEmployee() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Head = new javax.swing.JPanel();
        lblHeadListEm = new javax.swing.JLabel();
        btnEmListSearch = new javax.swing.JButton();
        btnEmListAdd = new javax.swing.JButton();
        btnEmListDel = new javax.swing.JButton();
        btnEmListEdit = new javax.swing.JButton();
        btnEmPrint = new javax.swing.JButton();
        List = new javax.swing.JPanel();
        txtEmCode = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListEm = new javax.swing.JTable();
        lblListEm = new javax.swing.JLabel();
        txtEmName = new javax.swing.JTextField();
        lblNameEm = new javax.swing.JLabel();
        lblAddressEm = new javax.swing.JLabel();
        lblMailEm = new javax.swing.JLabel();
        txtlEmMai = new javax.swing.JTextField();
        lblEmPhone = new javax.swing.JLabel();
        lblFunctionEm = new javax.swing.JLabel();
        cbbEmFunction = new javax.swing.JComboBox();
        lblLastEm = new javax.swing.JLabel();
        txtEmLast = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        txaEmAddress = new javax.swing.JTextArea();
        lblProvinceEm = new javax.swing.JLabel();
        lblZipEm = new javax.swing.JLabel();
        txtEmZip = new javax.swing.JTextField();
        cbbEmProvince = new javax.swing.JComboBox();
        txtEmPhone = new javax.swing.JTextField();
        lblEmDate = new javax.swing.JLabel();
        txtEmDate = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        Head.setBackground(new java.awt.Color(204, 255, 204));
        Head.setMaximumSize(new java.awt.Dimension(700, 700));
        Head.setMinimumSize(new java.awt.Dimension(700, 80));
        Head.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadListEm.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadListEm.setText("การจัดการข้อมูลพนักงาน");

        btnEmListSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnEmListAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/add_30x30.gif"))); // NOI18N

        btnEmListDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnEmListEdit.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnEmListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnEmListEdit.setMaximumSize(new java.awt.Dimension(75, 30));
        btnEmListEdit.setMinimumSize(new java.awt.Dimension(75, 30));
        btnEmListEdit.setPreferredSize(new java.awt.Dimension(75, 30));

        btnEmPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnEmPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnEmPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnEmPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout HeadLayout = new javax.swing.GroupLayout(Head);
        Head.setLayout(HeadLayout);
        HeadLayout.setHorizontalGroup(
            HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HeadLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadListEm, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(HeadLayout.createSequentialGroup()
                        .addComponent(btnEmListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnEmListAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnEmListDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnEmListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(btnEmPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(440, Short.MAX_VALUE))
        );
        HeadLayout.setVerticalGroup(
            HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HeadLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnEmPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(HeadLayout.createSequentialGroup()
                        .addComponent(lblHeadListEm)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnEmListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnEmListAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnEmListDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnEmListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(14, 14, 14))
        );

        add(Head, java.awt.BorderLayout.NORTH);

        List.setMinimumSize(new java.awt.Dimension(700, 416));
        List.setPreferredSize(new java.awt.Dimension(700, 416));

        txtEmCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmCodeActionPerformed(evt);
            }
        });

        tblListEm.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblListEm.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "รหัสพนักงาน", "ชื่อพนักงาน", "หน้าที่"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListEm);

        lblListEm.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblListEm.setText("รหัสพนักงาน :");

        txtEmName.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmNameActionPerformed(evt);
            }
        });

        lblNameEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblNameEm.setText("ชื่อ :");

        lblAddressEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblAddressEm.setText("ที่อยู่ :");

        lblMailEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblMailEm.setText("อีเมลล์ :");

        txtlEmMai.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtlEmMai.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtlEmMaiActionPerformed(evt);
            }
        });

        lblEmPhone.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEmPhone.setText("เบอร์โทรศัพท์ :");

        lblFunctionEm.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblFunctionEm.setText("หน้าที่ :");

        lblLastEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblLastEm.setText("นามสกุล :");

        txaEmAddress.setColumns(10);
        txaEmAddress.setRows(2);
        jScrollPane2.setViewportView(txaEmAddress);

        lblProvinceEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProvinceEm.setText("จังหวัด :");

        lblZipEm.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblZipEm.setText("รหัสไปรษณีย์ :");

        txtEmZip.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmZip.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmZipActionPerformed(evt);
            }
        });

        cbbEmProvince.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtEmPhone.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmPhone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmPhoneActionPerformed(evt);
            }
        });

        lblEmDate.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEmDate.setText("วัน/เดือน/ปี เกิด :");

        txtEmDate.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        javax.swing.GroupLayout ListLayout = new javax.swing.GroupLayout(List);
        List.setLayout(ListLayout);
        ListLayout.setHorizontalGroup(
            ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ListLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 675, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ListLayout.createSequentialGroup()
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblEmDate)
                            .addComponent(lblAddressEm)
                            .addComponent(lblListEm))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtEmDate, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                            .addComponent(txtEmCode, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE))
                        .addGap(10, 10, 10)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProvinceEm)
                            .addComponent(lblNameEm)
                            .addComponent(lblEmPhone)
                            .addComponent(lblFunctionEm))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(cbbEmFunction, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtEmPhone, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbEmProvince, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtEmName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblZipEm, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblLastEm, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblMailEm, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtlEmMai, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                            .addComponent(txtEmZip, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                            .addComponent(txtEmLast, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))))
                .addContainerGap())
        );
        ListLayout.setVerticalGroup(
            ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ListLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                        .addComponent(lblListEm)
                        .addComponent(lblNameEm)
                        .addComponent(txtEmName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtEmLast, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lblLastEm))
                    .addComponent(txtEmCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblAddressEm)
                    .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblProvinceEm)
                        .addComponent(cbbEmProvince, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(ListLayout.createSequentialGroup()
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblZipEm)
                            .addComponent(txtEmZip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtlEmMai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblMailEm)
                            .addComponent(lblEmPhone)
                            .addComponent(txtEmPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblEmDate)
                    .addComponent(txtEmDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(ListLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbEmFunction, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lblFunctionEm)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(106, 106, 106))
        );

        add(List, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void txtEmCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmCodeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEmCodeActionPerformed

    private void txtEmNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEmNameActionPerformed

    private void txtlEmMaiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtlEmMaiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtlEmMaiActionPerformed

    private void txtEmZipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmZipActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEmZipActionPerformed

    private void txtEmPhoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmPhoneActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEmPhoneActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel Head;
    private javax.swing.JPanel List;
    private javax.swing.JButton btnEmListAdd;
    private javax.swing.JButton btnEmListDel;
    private javax.swing.JButton btnEmListEdit;
    private javax.swing.JButton btnEmListSearch;
    private javax.swing.JButton btnEmPrint;
    private javax.swing.JComboBox cbbEmFunction;
    private javax.swing.JComboBox cbbEmProvince;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lblAddressEm;
    private javax.swing.JLabel lblEmDate;
    private javax.swing.JLabel lblEmPhone;
    private javax.swing.JLabel lblFunctionEm;
    private javax.swing.JLabel lblHeadListEm;
    private javax.swing.JLabel lblLastEm;
    private javax.swing.JLabel lblListEm;
    private javax.swing.JLabel lblMailEm;
    private javax.swing.JLabel lblNameEm;
    private javax.swing.JLabel lblProvinceEm;
    private javax.swing.JLabel lblZipEm;
    private javax.swing.JTable tblListEm;
    private javax.swing.JTextArea txaEmAddress;
    private javax.swing.JTextField txtEmCode;
    private javax.swing.JTextField txtEmDate;
    private javax.swing.JTextField txtEmLast;
    private javax.swing.JTextField txtEmName;
    private javax.swing.JTextField txtEmPhone;
    private javax.swing.JTextField txtEmZip;
    private javax.swing.JTextField txtlEmMai;
    // End of variables declaration//GEN-END:variables

}
